import Vue from "vue";

import "normalize.css/normalize.css"; // A modern alternative to CSS resets

import ElementUI, { Loading } from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
//import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import zhLocale from "element-ui/lib/locale/lang/zh-CN";

import VueParticles from "vue-particles";
Vue.use(VueParticles);

import "@/styles/index.scss"; // global css

import App from "./App";
import store from "./store";
import router from "./router";
import config from "@/config";

import "@/icons"; // icon
import "@/permission"; // permission control

/**
 * @description 全局过滤器 引入——注入
 */
import filters from "@/utils/filters.js";

for (let key in filters) {
  Vue.filter(key, filters[key]);
}

/**
 * @description 全局注册应用配置
 */
Vue.prototype.$config = config;
// Vue.prototype.$https = "http://192.168.3.196:8546";

Vue.prototype.$https = "http://192.168.31.152:8546"
Vue.prototype.$httpsCad = "http://192.168.31.152:7569"
// Vue.prototype.$https = "http://39.104.60.12:8546";
// Vue.prototype.$https = "http://39.104.60.12:8547";
// Vue.prototype.$httpsCad = "http://49.4.89.238:7852";

Vue.prototype.$loadingData = {
  fullscreen: true
};
/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
 */
// import { mockXHR } from '../mock'
// if (process.env.NODE_ENV === 'production') {
//     mockXHR()
// }

// set ElementUI lang to EN
Vue.use(ElementUI, { zhLocale });

Vue.config.productionTip = false;

new Vue({
  el: "#app",
  router,
  store,
  render: h => h(App)
});
